GskRenderNode: Use C99 flexible arrays to avoid extra allocation
authorAlexander Larsson <alexl@redhat.com>
Wed, 21 Dec 2016 11:20:56 +0000 (12:20 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 21 Dec 2016 13:01:34 +0000 (14:01 +0100)
commit230d27b079c4b98b1eb5000a0e70ca95a937c9c5
treefbc0adb48ce32cd414200114190b16812a3d3da0
parent22110ef5a480fbddf9d20f510a64f4524a52718f
GskRenderNode: Use C99 flexible arrays to avoid extra allocation

Instead of a separate allocation for any arrays in the render node
we allocate these as part of the render node itself, using C99
flexible arrays.

This leads to less allocations, which is nice, but the major reason
for this is that it allows us to change the allocation scheme further
in the future. For instance, we want to do stack-like allocation so
that all the render-nodes for an entire frame are allocated in one
(or a few) chunks.
gsk/gskrendernode.c
gsk/gskrendernodeimpl.c
gsk/gskrendernodeprivate.h